package com.ys.service.purchase;

import com.ys.entity.purchase.TcgPurchaseByOrder;
import com.ys.entity.purchase.TcgPurchaseByOrderSon;
import com.ys.vo.R;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 采购订单
 */
public interface TcgPurchaseByOrderService {

	//由计划单新增采购订单
	R addByPlan(Long goodsId,String planBid) throws Exception ;

	//审核
	//R examine(Long goodsId,String planBid,int operateStatus)throws Exception;

	//特殊审核
	//R specialExamine(Long goodsId,String planBid,int operateStatus)throws Exception;


	//审核
	R examine(String bid)throws Exception;

	//特殊审核
	R specialExamine(String bid)throws Exception;

	//更换渠道
	R changeChannel(Long id)throws Exception;

	//订单取消-变更状态
	R cancelOrder(List<Map<String, Object>> detailList,String cancelReason)throws Exception;

	//修改
	R update(Map<String, Object> params, Long menuId) throws Exception ;

	//订单刷新
	R refreshOrder(List<Map<String, Object>> detailList)throws Exception;

	//计算子件实际单价、总价信息
	void countSubRealityPrice(TcgPurchaseByOrder purchaseOrder)throws Exception;

	//更新订单管理状态
	R updateOrderManageStatus(String bid)throws Exception;


	//修改商议订单金额（含运）
	R updateOrderAmountDiscuss(String bid, String orderAmountDiscuss) throws Exception ;


	//修改采购订单金额（含税）
	R updatePurchaseOrderAmount(String bid, String purchaseOrderAmount) throws Exception ;

	R cancelOrderByOneRow(Long purchasePlanGoodsId,String planBid,int operateStatus,int orderStatus,String cancelReason,boolean planIsCancel) throws Exception ;


	//占用红包
	R occupy(Long id)throws Exception;


	//编辑工作日志
	R workLog(Long id, String workLog)throws Exception;


	//修改协议价
	R updateNegotiatedPrice(String bid, String negotiatedPrice, String spBm) throws Exception ;



}